<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript">
	$(function(){
		var tree = new S.Tree({
			el:'#projectModelsTree',
			ds:'${webcontext }/${pathvar.admin}/br/project/modules/list?projectId=${project.id}',
			render:function(node){
				return '<a class="icons brick"></a> '+node.name;
			},
			loaded:function(){
				tree.setChecked(['${requirement.moduleId}']);
			},
			click:function(node){
				$('#pmoduleId').val(node.data.id);
			}
		});
	});
</script>	
	<div class="filled-box">
		<div class="sidebar" style="width: 460px;">
			<div class="content">
				<form action="" style="position:relative;">
					<input type="hidden" value="${requirement.id }" name="id" />
					<input type="hidden" value="${project.id }" name="projectId" />
					<input type="hidden" name="moduleId" value="${requirement.moduleId}" id="pmoduleId" />
					<div class="legend" style="max-width: 800px;">需求信息</div>
					<table width="100%">
						<tr>
							<td width="60">标题</td>
							<td><input type="text" class="long"  name="title" value="${requirement.title }" check="required"/></td>
						</tr>
						<tr>
							<td>状态</td>
							<td><select name="status">
								<option value="1"　${requirement.status==1?'selected="selected"':'' }>等　待</option>
								<option value="2" ${requirement.status==2?'selected="selected"':'' }>进行中</option>
								<option value="3" ${requirement.status==3?'selected="selected"':'' }>已完成</option>
								<option value="4" ${requirement.status==4?'selected="selected"':'' }>抛　弃</option>
							</select></td>
						</tr>
						<tr>
							<td colspan="2" style="text-indent: 0px;text-align: center;"><textarea rows="10" cols="30" style="height: 300px;width: 95%" name="content">${requirement.content }</textarea></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
		<div class="rightside" style="margin-left:460px;">
			<div class="content" >
				 <div class="legend" style="max-width:800px">所属模块</div> 
				 <div id="projectModelsTree">
				 	<div><a class="icons computer"></a> ${project.name }</div>
				 </div>
			</div>
		</div>
	</div>